Field of the Invention
The present disclosure relates to a computer monitoring system, and more specifically, to a system for self-monitoring object-oriented applications.
Description of the Related Art
Monitoring the running states of computer software is an important task. In the context of modern cloud computing, the real-time monitoring of software running states of each node, in the context of cloud computing, is valuable to provide knowledge of health conditions of the whole cloud computing system and maintenance of the whole cloud computing system.
FIG. 1 is a transaction-representative-digraph of an object-oriented application. A transaction is a series of operations executed by a single logic working unit, and a combination of the operations is a unit either totally successful or totally failed. For example, drawing money is a transaction. Either drawing money is successful or drawing money fails. A class is an abstract of objects having identical or similar properties. For example, drawing money from ATM machine, drawing money by password authentication, drawing money by fingerprint authentication, drawing money by pupil authentication and drawing money by authentication card are five classes. The transaction of drawing money is uniformly represented by an interface. The interface declares such a transaction as drawing money but does not to implement it, and waits for each class to implement it respectively. In the implementations, the five classes of drawing money from ATM machine, drawing money by password authentication, drawing money by fingerprint authentication, drawing money by pupil authentication and drawing money by authentication card respectively implement the interface of drawing money, but have different modes of implementation. Each process invoked by the specific implementations is a node (i.e., method) in FIG. 1.
For example, when drawing money from an ATM machine, a node 10 starts working, that is, drawing money from ATM machine is accepted. During the process, password authentication is needed, so the node 10 invokes the node 2. When the node 2 performs the password authentication, it is needed to compare with a password library or identity database, so a node 11 or 8 can be invoked. When the node 11 performs comparison with the password library, it is needed to invoke the password library, so the node 12 is invoked. When the node 8 performs comparison with the identity database, it is needed to invoke the identity database, so a node 9 is invoked. FIG. 1 represents a complete transaction of drawing money.
Previously, when it is needed to monitor an object-oriented application, real-time running of the application is monitored first, and then a transaction-representative-digraph shown in FIG. 1 is built according to the real-time running of the application. Thereafter, a monitor program is instrumented before and after each node in the figure, as shown in FIG. 2, in which instrument 15 monitor the programs in FIG. 2. However, monitor overheads are high because a monitor program is needed to be instrumented before and after each node.